package com.xyy.saas.payment.common.enums;

public enum SettlementStatusEnum {
    PENDING(1, "待处理"),
    PROCESSING(4, "处理中"),
    SUCCESS(8, "成功"),
    FAIL(16, "失败"),
    ;

    public static SettlementStatusEnum get(Integer status) {
        for(SettlementStatusEnum statusEnum : values()) {
            if(statusEnum.getStatus().equals(status)) {
                return statusEnum;
            }
        }

        throw new UnsupportedOperationException("FrozenSettlementStatusEnum, status=" + status);
    }

    SettlementStatusEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    private Integer status;
    private String desc;

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
